# -*- coding:utf8 -*- #
# -----------------------------------------------------------------------------------
# ProjectName:  smart-water-iot-test
# FileName:     threadUtil.py
# Author  :
# Datetime:     2022/8/29 13:40
# Description：
# -----------------------------------------------------------------------------------

from threading import Thread

from common.util.logUtil.logUtil import LoggerUtil

logger = LoggerUtil()


def thread_job(jobFunc, *agrs):
    try:
        jobThread = Thread(target=jobFunc, args=agrs)
        jobThread.setDaemon(True)
        jobThread.start()
    except Exception as e:
        logger.error(e)
        raise e


def thread_job1(jobFunc, agrs):
    try:
        jobThread = Thread(target=jobFunc, args=agrs)
        # jobThread.setDaemon(True)
        jobThread.start()
    except Exception as e:
        logger.error(e)
        raise e


if __name__ == '__main__':
    pass
